#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
from socket import *
from threading import Thread
client = socket(AF_INET, SOCK_STREAM)
client.connect(("127.0.0.1", 19992))

while True:
    msg = input(">>>: ").encode("utf-8")
    if len(msg) == 0: continue
    # msg = "hello world".encode("utf-8")
    client.send(msg)
    data = client.recv(1024).decode("utf-8")
    print(data)